Graphs Fundamentals

Definitions


Good Will Hunting (Pt 1)

A pop-culture problem involving graph theory comes from Good Will Hunting where Professor Lambeau asks his students to "[d]raw all the [distinct] homeomorphically irreducible trees with [order] 10". Based on our definitions above, we should be able to find all ten.
Solution

Will Hunting's Solution

> The scene from the movie:

goodwill-scene.jpg

Though Professor Lambeau mentions the notorious difficulty of this problem, we can see after our exploration of graph theory that it is not so hard!

Adjacency Matrices


Good Will Hunting (Pt 2)

Revisiting Good Will Hunting, the professor earlier asked his class to find the adjacency matrix of the following graph.
goodwill-graph.png
Additionally, he wanted them to find the matrix giving the number of 3-step walks (paths involving three edges).
Adjacency matrix solution

3-step walks solution


Bridges of Königsberg

The mathmatician Euler puzzled over the Prussian city of Königsberg, wondering how one could cross each of the seven bridges (on the map below) exactly once.
konigsberg-map.png
Can you find a way to do so?
Solution

> Sorry, it's impossible! However, during WWII, the city was bombed, causing two of the bridges to be destroyed. Now, Königsberg has been renamed Kaliningrad. A recent map of Kaliningrad (rendered in 2023) is below.

kaliningrad-map.png
Now another question: can you cross these remaining five bridges exactly once?

Solution

> Here's how you could cross these five bridges on your next vacation:

kaliningrad-solution.png


Special Paths

There are four particularly special types of paths. In both Eulerian paths and cycles, all edges of a graph are included in the path. In both Hamiltonian paths and cycles, all vertices are endpoints of edges on the path.

Challenge: Finding Special Paths (Pt 1)

Try to find rules for when a graph has one of these special paths.
Hint for Eulerian

Hint for Hamiltonian

Solution for Eulerian

Solution for Hamiltonian


Directed Graphs


Challenge: Finding Special Paths (Pt 2)

Try to come up with a rule for when Eulerian and Hamiltonian paths/cycles exist on a directed graph. These may be similar to the rules you have come up with earlier.
Solution for Eulerian

Solution for Hamiltonian